﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace Licenta1.RayTracer
{
    class RTObject
    {
        MathShape shape;
        Material material;

        public RTObject(MathShape Shape, Material Material)
        {
            shape = Shape;
            material = Material;
        }

        public RTObject(MathShape Shape)
            : this(Shape, new SolidColorMaterial(0, 0, 1))
        {

        }

        public double[] Intersects(Ray ray)
        {
            return shape.Intersects(ray);
        }

        public Material MATERIAL
        {
            get { return material; }
        }

        public MathShape SHAPE
        {
            get { return shape; }
        }

        public Color COLOR
        {
            get { return material.GetColorAt(0, 0); }
        }
    }

}
